<?php /* Smarty version Smarty-3.1.13, created on 2013-05-30 16:38:46
         compiled from "static\skin\pages\forum.tpl" */ ?>
<?php /*%%SmartyHeaderCode:431951a7647645fca8-10609012%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'cb59cfa1a8a5e4c766576c561c470f13f9b26872' => 
    array (
      0 => 'static\\skin\\pages\\forum.tpl',
      1 => 1366966721,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '431951a7647645fca8-10609012',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'mode' => 0,
    'forum' => 0,
    'topic' => 0,
    'categories' => 0,
    'cat' => 0,
    'user' => 0,
    'action' => 0,
    'openTopicForm' => 0,
    'add_topic_title' => 0,
    'add_topic_content' => 0,
    'add_topic_submit' => 0,
    'input_hidden_forumid' => 0,
    'closeTopicForm' => 0,
    'start' => 0,
    'post_page' => 0,
    'post' => 0,
    'id_topic' => 0,
    'i' => 0,
    'openPostForm' => 0,
    'textarea_post' => 0,
    'submit_post' => 0,
    'input_hidden_topicid' => 0,
    'input_hidden_topicstatus' => 0,
    'closePostForm' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.13',
  'unifunc' => 'content_51a76478735d03_55012546',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_51a76478735d03_55012546')) {function content_51a76478735d03_55012546($_smarty_tpl) {?><script>
    function addEmoticon(target, emo){
    
    elem = document.getElementById(target);
    elem.value += " :" + emo + ":";
}

function quoteMessage(username, post_content){
    elem = document.getElementById('post_text');
    current_content = elem.value;
    elem.value = "[quote="+username+"]"+post_content+"[/quote]";
    //elem.value += current_content;
}

</script>
<div id="content_left">

    <!-- primary content start -->

    <div class="post">

        <div class="post_content">


        <?php if (isset($_smarty_tpl->tpl_vars['mode']->value)&&$_smarty_tpl->tpl_vars['mode']->value=='forum'){?><p style="vertical-align: middle;"><img style="vertical-align: middle;"src="static/images/layout/addtopic.png" /> <a href="forum.php?mode=forum&id=<?php echo $_smarty_tpl->tpl_vars['forum']->value->id_forum;?>
&action=add">Crea una nuova discussione </a></p><?php }?>
        <br /> <br />
        <table class="tab" width="590" border="1">
            <tbody>
                
            <b>Navigazione: </b>
            <a href="forum.php">Indice</a><?php if (isset($_smarty_tpl->tpl_vars['mode']->value)&&$_smarty_tpl->tpl_vars['mode']->value=='forum'){?> :: <a href="forum.php?mode=forum&id=<?php echo $_smarty_tpl->tpl_vars['forum']->value->id_forum;?>
"><?php echo $_smarty_tpl->tpl_vars['forum']->value->name;?>
</a><?php }?><?php if (isset($_smarty_tpl->tpl_vars['mode']->value)&&$_smarty_tpl->tpl_vars['mode']->value=='topic'){?> :: <a href="forum.php?mode=forum&id=<?php echo $_smarty_tpl->tpl_vars['forum']->value->id_forum;?>
"><?php echo $_smarty_tpl->tpl_vars['forum']->value->name;?>
</a> :: <a href="forum.php?mode=topic&id=<?php echo $_smarty_tpl->tpl_vars['topic']->value->id_topic;?>
"><?php echo $_smarty_tpl->tpl_vars['topic']->value->name;?>
</a><?php }?>

            <!-- Sezione per le categorie -->
            <?php if (!isset($_smarty_tpl->tpl_vars['mode']->value)){?>
                <?php  $_smarty_tpl->tpl_vars['cat'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['cat']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['categories']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['cat']->key => $_smarty_tpl->tpl_vars['cat']->value){
$_smarty_tpl->tpl_vars['cat']->_loop = true;
?>
                    <tr>
                        <td class="tb_head" style="padding-left: 15px;" colspan="2"><?php echo $_smarty_tpl->tpl_vars['cat']->value->name;?>
</td>
                        <td class="tb_head" align="center">Contenuto</td>
                        <td class="tb_head" align="center">Ultimo mess.</td>
                        <?php if ($_smarty_tpl->tpl_vars['user']->value->isAdmin()){?>
                        <td class="tb_head" align="center">Admin</td>
                        <td class="tb_head" align="center" width="25">
                            <a href="forum.php?mode=category&id=<?php echo $_smarty_tpl->tpl_vars['cat']->value->name;?>
&action=remove">
                                <img valign="middle" src="static/images/layout/remove.png" />
                            </a>
                        </td>
                        <?php }?>
                    </tr>
                    <?php  $_smarty_tpl->tpl_vars['forum'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['forum']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['cat']->value->getForums(); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['forum']->key => $_smarty_tpl->tpl_vars['forum']->value){
$_smarty_tpl->tpl_vars['forum']->_loop = true;
?>
                        <tr class="li">
                            <td class="ic" width="40">
                                <a href="forum.php?mode=forum&id=<?php echo $_smarty_tpl->tpl_vars['forum']->value->id_forum;?>
">
                                    <img border="0" alt="" src="static/images/layout/emptyfolder.png">
                                </a>
                            </td>
                            <td class="c1" width="330">
                                <div class="datb">
                                    <a href="forum.php?mode=forum&id=<?php echo $_smarty_tpl->tpl_vars['forum']->value->id_forum;?>
">
                                        <b><?php echo $_smarty_tpl->tpl_vars['forum']->value->name;?>
</b>
                                    </a>
                                </div>
                                <div class="dat">
                                    <?php echo $_smarty_tpl->tpl_vars['forum']->value->desc;?>

                                </div>
                            </td>
                            <td class="c2" width="100">
                                <div class="dat">
                                    <?php echo $_smarty_tpl->tpl_vars['forum']->value->getNrTopic();?>
 discussioni
                                    <br>
                                    <?php echo $_smarty_tpl->tpl_vars['forum']->value->getNrPosts();?>
 mess.
                                </div>
                            </td>
                            <td class="c3" width="120">
                                <div class="dat">
                                    <?php if ($_smarty_tpl->tpl_vars['forum']->value->getLastMessageDate()!=false){?>
                                        <?php echo Util::getDate($_smarty_tpl->tpl_vars['forum']->value->getLastMessageDate());?>
 alle <?php echo Util::getTime($_smarty_tpl->tpl_vars['forum']->value->getLastMessageDate());?>

                                    <?php }?>
                                    <br />
                                    <?php if ($_smarty_tpl->tpl_vars['forum']->value->getLastMessageCreator()!="nessuno"){?>
                                    da 
                                    <a id="m" class="a_profilo" href="profile.php?username=<?php echo $_smarty_tpl->tpl_vars['forum']->value->getLastMessageCreator();?>
"><?php echo $_smarty_tpl->tpl_vars['forum']->value->getLastMessageCreator();?>
</a>
                                    
                                    <?php }else{ ?>
                                        Nessun messaggio
                                    <?php }?>
                                    
                                </div>
                                    
                            </td>
                            <?php if ($_smarty_tpl->tpl_vars['user']->value->isAdmin()){?>
                            <td class="c3" width="40">
                                <a href="forum.php?mode=forum&id=<?php echo $_smarty_tpl->tpl_vars['forum']->value->id_forum;?>
&action=remove">
                                    <img valign="middle" src="static/images/layout/remove.png" />
                                </a>
                            </td>
                            <?php }?>
                        </tr>
                    <?php } ?>
                <?php } ?>
            <?php }elseif(isset($_smarty_tpl->tpl_vars['mode']->value)&&$_smarty_tpl->tpl_vars['mode']->value=='forum'){?>
                <?php if (isset($_smarty_tpl->tpl_vars['action']->value)&&$_smarty_tpl->tpl_vars['action']->value=='add'){?>
                    <!-- Creazione Topic -->
                    <h3>Crea nuova discussione</h3>
                    <?php echo $_smarty_tpl->tpl_vars['openTopicForm']->value;?>

                    <table id="reply_message">
                        <tr>
                            <td>
                                <?php echo $_smarty_tpl->tpl_vars['add_topic_title']->value;?>

                            </td>
                        </tr>
                        <tr>
                            <td>
                                <?php echo $_smarty_tpl->tpl_vars['add_topic_content']->value;?>

                            </td>
                            
                        </tr>
                        <tr>
                            <td>
                                <?php echo $_smarty_tpl->tpl_vars['add_topic_submit']->value;?>
 
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <h3>Smiles</h3>

                                <img src="static/images/emo/angry.gif" alt="angry" onclick="addEmoticon('topic_content', 'angry');" /> 
                                <img src="static/images/emo/biggrin.gif" alt="biggrin" onclick="addEmoticon('topic_content', 'biggrin');"  /> 
                                <img src="static/images/emo/blink.gif" alt="blink" onclick="addEmoticon('topic_content', 'blink');"  /> 
                                <img src="static/images/emo/blushing.gif" alt="blushing" onclick="addEmoticon('topic_content', 'blushing');"  /> 
                                <img src="static/images/emo/bored.gif" alt="bored" onclick="addEmoticon('topic_content', 'bored');"  />
                                <img src="static/images/emo/confused.gif" alt="confused" onclick="addEmoticon('topic_content', 'confused');"  /> 
                                <img src="static/images/emo/cool.gif" alt="cool" onclick="addEmoticon('topic_content', 'cool');"  /> 
                                <img src="static/images/emo/crying.gif" alt="crying" onclick="addEmoticon('topic_content', 'crying');"  /> 
                                <img src="static/images/emo/cursing.gif" alt="cursing" onclick="addEmoticon('topic_content', 'cursing');"  /> 
                                <img src="static/images/emo/drool.gif" alt="drool" onclick="addEmoticon('topic_content', 'drool');"  /> 
                                <img src="static/images/emo/flapper.gif" alt="flapper" onclick="addEmoticon('topic_content', 'flapper');"  /> 
                                <img src="static/images/emo/glare.gif" alt="glare" onclick="addEmoticon('topic_content', 'glare');"  /> 
                                <img src="static/images/emo/huh.gif" alt="huh" onclick="addEmoticon('topic_content', 'huh');"  /> 
                                <img src="static/images/emo/laugh.gif" alt="laugh" onclick="addEmoticon('topic_content', 'laugh');"  /> 
                                <img src="static/images/emo/lol.gif" alt="lol" onclick="addEmoticon('topic_content', 'lol');"  /> 
                                <img src="static/images/emo/love.gif" alt="love" onclick="addEmoticon('topic_content', 'love');"  /> 
                                <img src="static/images/emo/mad.gif" alt="mad" onclick="addEmoticon('topic_content', 'mad');"  /> <br />
                                <img src="static/images/emo/mellow.gif" alt="mellow" onclick="addEmoticon('topic_content', 'mellow');"  /> 
                                <img src="static/images/emo/ohmy.gif" alt="ohmy" onclick="addEmoticon('topic_content', 'ohmy');"  /> 
                                <img src="static/images/emo/rolleyes.gif" alt="rolleyes" onclick="addEmoticon('topic_content', 'rolleyes');"  /> 
                                <img src="static/images/emo/sad.gif" alt="sad" onclick="addEmoticon('topic_content', 'sad');"  /> 
                                <img src="static/images/emo/scared.gif" alt="scared" onclick="addEmoticon('topic_content', 'scared');"  /> 
                                <img src="static/images/emo/sleep.gif" alt="sleep" onclick="addEmoticon('topic_content', 'sleep');"  /> 
                                <img src="static/images/emo/smile.gif" alt="smile" onclick="addEmoticon('topic_content', 'smile');"  /> 
                                <img src="static/images/emo/sneaky.gif" alt="sneaky" onclick="addEmoticon('topic_content', 'sneaky');"  /> 
                                <img src="static/images/emo/thumbdn.gif" alt="thumbdn" onclick="addEmoticon('topic_content', 'thumbdn');"  /> 
                                <img src="static/images/emo/thumbsup.gif" alt="thumbsup" onclick="addEmoticon('topic_content', 'thumbsup');"  /> 
                                <img src="static/images/emo/thumbup.gif" alt="thumbup" onclick="addEmoticon('topic_content', 'thumbup');"  /> 
                                <img src="static/images/emo/tongue.gif" alt="tongue" onclick="addEmoticon('topic_content', 'tongue');"  /> 
                                <img src="static/images/emo/unsure.gif" alt="unsure" onclick="addEmoticon('topic_content', 'unsure');"  /> 
                                <img src="static/images/emo/w00t.gif" alt="w00t" onclick="addEmoticon('topic_content', 'w00t');"  /> 
                                <img src="static/images/emo/wink.gif" alt="wink" onclick="addEmoticon('topic_content', 'wink');"  /> 

                                <!--
                                <img src="static/images/emo/happy.gif" alt="happy" onclick="addEmoticon('topic_content', 'happy');" /> <img src="static/images/emo/clap.gif" alt="clap" onclick="addEmoticon('topic_content', 'clap');" /> <img src="static/images/emo/cool.gif" alt="cool" onclick="addEmoticon('topic_content', 'cool');"/> <img src="static/images/emo/thumbup.gif" alt="thumbup" onclick="addEmoticon('topic_content', 'thumbup');" />
                                -->
                            </td>
                            
                            <td>
                                <?php echo $_smarty_tpl->tpl_vars['input_hidden_forumid']->value;?>

                            </td>
                        </tr>
                        <tr>
                            <td>

                            </td>

                        </tr>


                    </table>
                    <?php echo $_smarty_tpl->tpl_vars['closeTopicForm']->value;?>


                <?php }else{ ?>
                    <!-- Sezione per i Forums -->
                    <tr>
                        <td class="tb_head" style="padding-left: 15px;" colspan="2"><?php echo $_smarty_tpl->tpl_vars['forum']->value->name;?>
</td>
                        <td class="tb_head" align="center">Statistiche</td>
                        <td class="tb_head" align="center">Ultimo mess.</td>
                    </tr>
                    <?php  $_smarty_tpl->tpl_vars['topic'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['topic']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['forum']->value->getTopics(); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['topic']->key => $_smarty_tpl->tpl_vars['topic']->value){
$_smarty_tpl->tpl_vars['topic']->_loop = true;
?>
                        <tr class="li">
                            <td class="ic" width="40">
                                <a href="forum.php5?mode=topic&id=1">
                                    <?php if ($_smarty_tpl->tpl_vars['topic']->value->status==0){?>
                                        <img border="0" alt="" src="static/images/layout/lockclosetopic.png">
                                    <?php }else{ ?>
                                        <img border="0" alt="" src="static/images/layout/emptyfolder.png">
                                    <?php }?>
                                </a>
                            </td>
                            <td class="c1" width="315">
                                <a href="forum.php?mode=topic&id=<?php echo $_smarty_tpl->tpl_vars['topic']->value->id_topic;?>
"><?php echo $_smarty_tpl->tpl_vars['topic']->value->name;?>
</a>
                                <div class="dat" align="right">
                                    creata da 
                                    <a id="m" class="a_profilo" href="profilo.php5?id=11402"><?php echo $_smarty_tpl->tpl_vars['topic']->value->creator;?>
</a>
                                </div>
                            </td>
                            <td class="c2" width="100">
                                <div class="dat">
                                    <?php echo $_smarty_tpl->tpl_vars['topic']->value->getNrPosts();?>
 mess.
                                    <br>
                                    <?php echo $_smarty_tpl->tpl_vars['topic']->value->views;?>
 visite
                                </div>
                            </td>
                            <td class="c3" width="120">
                                <div class="dat">
                                    <?php if ($_smarty_tpl->tpl_vars['forum']->value->getLastMessageDate()!=false){?>
                                        <?php echo Util::getDate($_smarty_tpl->tpl_vars['forum']->value->getLastMessageDate());?>
 alle <?php echo Util::getTime($_smarty_tpl->tpl_vars['forum']->value->getLastMessageDate());?>

                                    <?php }?>
                                    <br />
                                    <?php if ($_smarty_tpl->tpl_vars['forum']->value->getLastMessageCreator()!="nessuno"){?>
                                    da 
                                    <a id="m" class="a_profilo" href="profile.php?username=<?php echo $_smarty_tpl->tpl_vars['forum']->value->getLastMessageCreator();?>
"><?php echo $_smarty_tpl->tpl_vars['forum']->value->getLastMessageCreator();?>
</a>
                                   
                                    <?php }else{ ?>
                                        Nessun messaggio
                                    <?php }?>
                                    
                                </div>
                            </td>
                        </tr>
                    <?php } ?>
                <?php }?>
            <?php }elseif(isset($_smarty_tpl->tpl_vars['mode']->value)&&$_smarty_tpl->tpl_vars['mode']->value=='topic'){?>
                <!-- Sezione per i POST -->
                <br /> <br />
                <h3><img style="vertical-align:middle; padding-right: 20px;"src="static/images/layout/topiclogo.png" /><font style="text-decoration: underline; color:#3521AB;">Discussione:</font> <?php echo $_smarty_tpl->tpl_vars['topic']->value->name;?>
</h3>
                <table class="tab" width="590" bordercolor="#5C5C5C" border="1">
                    <tbody>
                        <!-- primo messaggio -->
                        <?php if ($_smarty_tpl->tpl_vars['start']->value==0){?>
                            <tr>
                                <td class="tb_head" width="100" style="padding-left: 15px;">Mittente</td>
                                <td class="tb_head" width="490" align="center">Messaggio</td>
                            </tr>
                            <tr class="li">
                                <td class="p1">
                                    <div align="right">
                                        <?php if ($_smarty_tpl->tpl_vars['user']->value->isOnlineUser($_smarty_tpl->tpl_vars['topic']->value->creator,true)){?>
                                            <img style="vertical-align: middle;" border="0" alt="" src="static/images/layout/online.png" />
                                        <?php }else{ ?>
                                            <img style="vertical-align: middle;" border="0" alt="" src="static/images/layout/offline.png" />

                                        <?php }?>
                                        
                                        <a id="m" class="a_profilo" href="profile.php?username=<?php echo $_smarty_tpl->tpl_vars['topic']->value->creator;?>
"><?php echo $_smarty_tpl->tpl_vars['topic']->value->creator;?>
</a>
                                        <br>
                                        <a href="profile.php?username=<?php echo $_smarty_tpl->tpl_vars['topic']->value->creator;?>
">
                                            <img class="img1" border="0" alt="" src="<?php echo User::getCreatorImage($_smarty_tpl->tpl_vars['topic']->value->creator);?>
">
                                        </a>
                                        <?php if ($_smarty_tpl->tpl_vars['user']->value->username==$_smarty_tpl->tpl_vars['topic']->value->creator){?>
                                            <?php if ($_smarty_tpl->tpl_vars['topic']->value->status==1){?>
                                                <a href="forum.php?mode=topic&id=<?php echo $_smarty_tpl->tpl_vars['topic']->value->id_topic;?>
&action=close">
                                                    <img border="0" alt="" src="static/images/layout/lockclosetopic.png" />
                                                </a>
                                            <?php }?>
                                            <?php if ($_smarty_tpl->tpl_vars['topic']->value->status==0){?>
                                                <a href="forum.php?mode=topic&id=<?php echo $_smarty_tpl->tpl_vars['topic']->value->id_topic;?>
&action=open">
                                                    <img border="0" alt="" src="static/images/layout/lockopentopic.png" />
                                                </a>
                                            <?php }?>
                                            
                                            
                                        <?php }?>
                                        <?php if ($_smarty_tpl->tpl_vars['user']->value->isAdmin()){?>
                                            <a href="forum.php?mode=topic&id=<?php echo $_smarty_tpl->tpl_vars['topic']->value->id_topic;?>
&action=delete">
                                                <img border="0" alt="" src="static/images/layout/deletetopic.png" />
                                            </a>
                                        <?php }?>
                                    </div>
                                </td>
                                <td class="p1" valign="top">
                                    <table width="100%" cellspacing="0" cellpadding="0">
                                        <tbody>
                                            <tr>
                                                <td class="small" valign="top">
                                                    <a name="p2571780"></a>
                                                    <img border="0" alt="" src="static/images/layout/sent.png">
                                                    <b>Inviato:</b>
                                                    <?php echo Util::getDate($_smarty_tpl->tpl_vars['topic']->value->creation_date);?>
 alle <?php echo Util::getTime($_smarty_tpl->tpl_vars['topic']->value->creation_date);?>

                                                </td>
                                                <td class="small" valign="top" align="right"> </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                    <hr width="100%" size="1" noshade="" color="#5C5C5C" align="left">
                                    <div class="mess_int">
                                        <?php echo Util::parsePostContent($_smarty_tpl->tpl_vars['topic']->value->content);?>

                                    </div>
                                </td>
                            </tr>
                        <?php }?>
                        <?php  $_smarty_tpl->tpl_vars['post'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['post']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['topic']->value->getPosts($_smarty_tpl->tpl_vars['start']->value,$_smarty_tpl->tpl_vars['post_page']->value); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['post']->key => $_smarty_tpl->tpl_vars['post']->value){
$_smarty_tpl->tpl_vars['post']->_loop = true;
?>

                            <tr class="li">
                                <td class="p2">
                                    <div align="right">
                                        <?php if ($_smarty_tpl->tpl_vars['user']->value->isOnlineUser($_smarty_tpl->tpl_vars['post']->value->creator,true)){?>
                                            <img style="vertical-align: middle;" border="0" alt="" src="static/images/layout/online.png" />
                                        <?php }else{ ?>
                                            <img style="vertical-align: middle;" border="0" alt="" src="static/images/layout/offline.png" />

                                        <?php }?>
                                        <a id="m" class="a_profilo" href="profile.php?username=<?php echo $_smarty_tpl->tpl_vars['post']->value->creator;?>
"><?php echo $_smarty_tpl->tpl_vars['post']->value->creator;?>
</a>
                                        <br>
                                        <a href="profile.php?username=<?php echo $_smarty_tpl->tpl_vars['post']->value->creator;?>
">
                                            <img class="img1" border="0" alt="" src="<?php echo User::getCreatorImage($_smarty_tpl->tpl_vars['post']->value->creator);?>
" />
                                        </a>
                                    </div>
                                </td>
                                <td class="p2" valign="top">
                                    <table width="100%" cellspacing="0" cellpadding="0">
                                        <tbody>
                                            <tr>
                                                <td class="small" valign="top">
                                                    <a name="p2571787"></a>
                                                    <img border="0" alt="" src="static/images/layout/sent.png">
                                                    <b>Inviato:</b>
                                                    <?php echo Util::getDate($_smarty_tpl->tpl_vars['post']->value->creation_date);?>
 alle <?php echo Util::getTime($_smarty_tpl->tpl_vars['post']->value->creation_date);?>


                                                </td>
                                                <td class="small" valign="top" align="right"> <?php if ($_smarty_tpl->tpl_vars['post']->value->creator==$_smarty_tpl->tpl_vars['user']->value->username){?><a href="forum.php?mode=de&id=<?php echo $_smarty_tpl->tpl_vars['post']->value->id_post;?>
">Cancella</a><?php }?> <a href="#footer" onclick="quoteMessage('<?php echo $_smarty_tpl->tpl_vars['post']->value->creator;?>
', '<?php echo $_smarty_tpl->tpl_vars['post']->value->content;?>
');">Rispondi</a></td>
                                            </tr>
                                        </tbody>
                                    </table>
                                    <hr width="100%" size="1" noshade="" color="#5C5C5C" align="left">
                                    <div class="mess_int">
                                        <?php echo Util::parsePostContent($_smarty_tpl->tpl_vars['post']->value->content);?>

                                    </div>
                                </td>
                            </tr>

                        <?php } ?>

                    </tbody>
                </table>
                <div style="text-align: right;padding-right: 20px;">
                    <!-- PAGINAZIONE -->
                    <?php if ((isset($_smarty_tpl->tpl_vars['start']->value)&&$_smarty_tpl->tpl_vars['start']->value!=0)){?>
                        <a href="forum.php?mode=<?php echo $_smarty_tpl->tpl_vars['mode']->value;?>
&id=<?php echo $_smarty_tpl->tpl_vars['id_topic']->value;?>
&start=<?php echo $_smarty_tpl->tpl_vars['start']->value-$_smarty_tpl->tpl_vars['post_page']->value;?>
">Precedente</a>
                    <?php }?>
                    <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_Variable;$_smarty_tpl->tpl_vars['i']->step = 1;$_smarty_tpl->tpl_vars['i']->total = (int)ceil(($_smarty_tpl->tpl_vars['i']->step > 0 ? ($_smarty_tpl->tpl_vars['topic']->value->getNrPosts()/$_smarty_tpl->tpl_vars['post_page']->value)+1 - (1) : 1-(($_smarty_tpl->tpl_vars['topic']->value->getNrPosts()/$_smarty_tpl->tpl_vars['post_page']->value))+1)/abs($_smarty_tpl->tpl_vars['i']->step));
if ($_smarty_tpl->tpl_vars['i']->total > 0){
for ($_smarty_tpl->tpl_vars['i']->value = 1, $_smarty_tpl->tpl_vars['i']->iteration = 1;$_smarty_tpl->tpl_vars['i']->iteration <= $_smarty_tpl->tpl_vars['i']->total;$_smarty_tpl->tpl_vars['i']->value += $_smarty_tpl->tpl_vars['i']->step, $_smarty_tpl->tpl_vars['i']->iteration++){
$_smarty_tpl->tpl_vars['i']->first = $_smarty_tpl->tpl_vars['i']->iteration == 1;$_smarty_tpl->tpl_vars['i']->last = $_smarty_tpl->tpl_vars['i']->iteration == $_smarty_tpl->tpl_vars['i']->total;?>
                    <?php if (!isset($_smarty_tpl->tpl_vars['start']->value)&&$_smarty_tpl->tpl_vars['i']->value==1){?>
                        <?php echo $_smarty_tpl->tpl_vars['i']->value;?>
, 
                    <?php }elseif(isset($_smarty_tpl->tpl_vars['start']->value)&&$_smarty_tpl->tpl_vars['i']->value==$_smarty_tpl->tpl_vars['start']->value/$_smarty_tpl->tpl_vars['post_page']->value+1){?>
                    <?php echo $_smarty_tpl->tpl_vars['i']->value;?>
<?php if ($_smarty_tpl->tpl_vars['i']->value!=intval($_smarty_tpl->tpl_vars['topic']->value->getNrPosts()/$_smarty_tpl->tpl_vars['post_page']->value+1)){?>,<?php }?>
                <?php }else{ ?>
                    <a href="forum.php?mode=<?php echo $_smarty_tpl->tpl_vars['mode']->value;?>
&id=<?php echo $_smarty_tpl->tpl_vars['id_topic']->value;?>
&start=<?php echo ($_smarty_tpl->tpl_vars['i']->value*$_smarty_tpl->tpl_vars['post_page']->value)-$_smarty_tpl->tpl_vars['post_page']->value;?>
"><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</a><?php if ($_smarty_tpl->tpl_vars['i']->value!=intval($_smarty_tpl->tpl_vars['topic']->value->getNrPosts()/$_smarty_tpl->tpl_vars['post_page']->value+1)){?>,<?php }?>
                <?php }?>
                <?php }} ?>
                <?php if (!isset($_smarty_tpl->tpl_vars['start']->value)){?>
                    <a href="forum.php?mode=<?php echo $_smarty_tpl->tpl_vars['mode']->value;?>
&id=<?php echo $_smarty_tpl->tpl_vars['id_topic']->value;?>
&start=<?php echo $_smarty_tpl->tpl_vars['post_page']->value;?>
">Prossima</a>
                <?php }else{ ?>
                    <?php if (!isset($_smarty_tpl->tpl_vars['start']->value)||(isset($_smarty_tpl->tpl_vars['start']->value)&&$_smarty_tpl->tpl_vars['start']->value/$_smarty_tpl->tpl_vars['post_page']->value!=intval($_smarty_tpl->tpl_vars['topic']->value->getNrPosts()/$_smarty_tpl->tpl_vars['post_page']->value))){?>

                        <a href="forum.php?mode=<?php echo $_smarty_tpl->tpl_vars['mode']->value;?>
&id=<?php echo $_smarty_tpl->tpl_vars['id_topic']->value;?>
&start=<?php echo $_smarty_tpl->tpl_vars['start']->value+$_smarty_tpl->tpl_vars['post_page']->value;?>
">Prossima</a>
                    <?php }?>

                <?php }?>
            </div>
            <?php if (isset($_smarty_tpl->tpl_vars['topic']->value)&&$_smarty_tpl->tpl_vars['topic']->value->status!=0){?>
            <!-- Formulario per mandare un POST -->
            <h3>Rispondi</h3>
            <?php echo $_smarty_tpl->tpl_vars['openPostForm']->value;?>

            <table id="reply_message">
                <tr>
                    <td>
                        <?php echo $_smarty_tpl->tpl_vars['textarea_post']->value;?>

                    </td>
                </tr>
                <tr>
                    <td>
                        <?php echo $_smarty_tpl->tpl_vars['submit_post']->value;?>
 
                    </td>
                    <td>
                        <?php echo $_smarty_tpl->tpl_vars['input_hidden_topicid']->value;?>

                    </td>
                    <td>
                        <?php echo $_smarty_tpl->tpl_vars['input_hidden_topicstatus']->value;?>

                    </td>
                </tr>
                <tr>
                    <td>
                        <h3>Smiles</h3>
                        
                        <img src="static/images/emo/angry.gif" alt="angry" onclick="addEmoticon('post_text', 'angry');" /> 
                        <img src="static/images/emo/biggrin.gif" alt="biggrin" onclick="addEmoticon('post_text', 'biggrin');"  /> 
                        <img src="static/images/emo/blink.gif" alt="blink" onclick="addEmoticon('post_text', 'blink');"  /> 
                        <img src="static/images/emo/blushing.gif" alt="blushing" onclick="addEmoticon('post_text', 'blushing');"  /> 
                        <img src="static/images/emo/bored.gif" alt="bored" onclick="addEmoticon('post_text', 'bored');"  />
                        <img src="static/images/emo/confused.gif" alt="confused" onclick="addEmoticon('post_text', 'confused');"  /> 
                        <img src="static/images/emo/cool.gif" alt="cool" onclick="addEmoticon('post_text', 'cool');"  /> 
                        <img src="static/images/emo/crying.gif" alt="crying" onclick="addEmoticon('post_text', 'crying');"  /> 
                        <img src="static/images/emo/cursing.gif" alt="cursing" onclick="addEmoticon('post_text', 'cursing');"  /> 
                        <img src="static/images/emo/drool.gif" alt="drool" onclick="addEmoticon('post_text', 'drool');"  /> 
                        <img src="static/images/emo/flapper.gif" alt="flapper" onclick="addEmoticon('post_text', 'flapper');"  /> 
                        <img src="static/images/emo/glare.gif" alt="glare" onclick="addEmoticon('post_text', 'glare');"  /> 
                        <img src="static/images/emo/huh.gif" alt="huh" onclick="addEmoticon('post_text', 'huh');"  /> 
                        <img src="static/images/emo/laugh.gif" alt="laugh" onclick="addEmoticon('post_text', 'laugh');"  /> 
                        <img src="static/images/emo/lol.gif" alt="lol" onclick="addEmoticon('post_text', 'lol');"  /> 
                        <img src="static/images/emo/love.gif" alt="love" onclick="addEmoticon('post_text', 'love');"  /> 
                        <img src="static/images/emo/mad.gif" alt="mad" onclick="addEmoticon('post_text', 'mad');"  /> <br />
                        <img src="static/images/emo/mellow.gif" alt="mellow" onclick="addEmoticon('post_text', 'mellow');"  /> 
                        <img src="static/images/emo/ohmy.gif" alt="ohmy" onclick="addEmoticon('post_text', 'ohmy');"  /> 
                        <img src="static/images/emo/rolleyes.gif" alt="rolleyes" onclick="addEmoticon('post_text', 'rolleyes');"  /> 
                        <img src="static/images/emo/sad.gif" alt="sad" onclick="addEmoticon('post_text', 'sad');"  /> 
                        <img src="static/images/emo/scared.gif" alt="scared" onclick="addEmoticon('post_text', 'scared');"  /> 
                        <img src="static/images/emo/sleep.gif" alt="sleep" onclick="addEmoticon('post_text', 'sleep');"  /> 
                        <img src="static/images/emo/smile.gif" alt="smile" onclick="addEmoticon('post_text', 'smile');"  /> 
                        <img src="static/images/emo/sneaky.gif" alt="sneaky" onclick="addEmoticon('post_text', 'sneaky');"  /> 
                        <img src="static/images/emo/thumbdn.gif" alt="thumbdn" onclick="addEmoticon('post_text', 'thumbdn');"  /> 
                        <img src="static/images/emo/thumbsup.gif" alt="thumbsup" onclick="addEmoticon('post_text', 'thumbsup');"  /> 
                        <img src="static/images/emo/thumbup.gif" alt="thumbup" onclick="addEmoticon('post_text', 'thumbup');"  /> 
                        <img src="static/images/emo/tongue.gif" alt="tongue" onclick="addEmoticon('post_text', 'tongue');"  /> 
                        <img src="static/images/emo/unsure.gif" alt="unsure" onclick="addEmoticon('post_text', 'unsure');"  /> 
                        <img src="static/images/emo/w00t.gif" alt="w00t" onclick="addEmoticon('post_text', 'w00t');"  /> 
                        <img src="static/images/emo/wink.gif" alt="wink" onclick="addEmoticon('post_text', 'wink');"  /> 
                        
                        <!--
                        <img src="static/images/emo/happy.gif" alt="happy" onclick="addEmoticon('post_text', 'happy');" /> <img src="static/images/emo/clap.gif" alt="clap" onclick="addEmoticon('post_text', 'clap');" /> <img src="static/images/emo/cool.gif" alt="cool" onclick="addEmoticon('post_text', 'cool');"/> <img src="static/images/emo/thumbup.gif" alt="thumbup" onclick="addEmoticon('post_text', 'thumbup');" />
                        -->
                    </td>

                </tr>
                <?php if (!$_smarty_tpl->tpl_vars['topic']->value->isFavorite($_smarty_tpl->tpl_vars['user']->value->username)){?>
                <tr>
                    
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    
                    <td>
                        <img src="static/images/layout/favorite.png" /> <a href="forum.php?mode=addfav&id=<?php echo $_smarty_tpl->tpl_vars['topic']->value->id_topic;?>
">Aggiungi ai preferiti</a>
                    </td>
                </tr>
                <?php }else{ ?>
                    <tr>
                    
                    <td>
                        &nbsp;
                    </td>
                    </tr>
                    <tr>

                        <td>
                            <img src="static/images/layout/favorite.png" /> <a href="forum.php?mode=rmfav&id=<?php echo $_smarty_tpl->tpl_vars['topic']->value->id_topic;?>
">Rimuovi dai preferiti</a>
                        </td>
                    </tr>
                <?php }?>
                
            </table>
            <?php echo $_smarty_tpl->tpl_vars['closePostForm']->value;?>

            <?php }?>
        <?php }?>
        

        </tbody>
    </table>

</div>

<!--
<div class="post_footer">
    <ul>
        <li class="like"><a href="#">Like (120)</a></li>
        <li class="comments"><a href="#">Comments (18)</a></li>
    </ul>


</div>
-->
</div>

</div>
<!--
<div id="content_right">

    <h3>Dancefloor  TV</h3>
    <div class="box_content">
        <img src="images/facebook_logo.png" class="box_border" alt="" />
        <p><strong>Dancefloor TV</strong> is based on a facebook page and a youtube channel that posts party videos made by us. <br />Follow us on facebook <a target="_blank" href="http://facebook.com/dancefloorvideos">More ...</a></p>
    </div>

</div>
-->
<?php }} ?>